package com.open.capacity.nk.controller;

import com.open.capacity.commons.PageResult;
import com.open.capacity.commons.Result;
import com.open.capacity.finance.entity.SourcePz;
import com.open.capacity.nk.dto.NKReceiptDto;
import com.open.capacity.nk.service.*;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

/**
 * @author
 * @email
 * @date 2023-03-01 22:09:01
 */
@RestController
@RequestMapping("reimburseReceipts")
@Api(tags = "")
public class NKReimburseReceiptController {

    @Autowired
    private NkReimburseReceiptService receiptService;

    /**
     * 4种报销单明细列表
     */
    @RequestMapping("/pageAll")
    public PageResult pageAll(@RequestParam Map<String, Object> params) {
        return receiptService.pageAll(params);
    }

    /**
     * 部门案件报销排名-报销种类分布
     */
    @RequestMapping("/listQuota")
    public Result listQuota(@RequestParam Map<String, Object> params) {
        List<NKReceiptDto> list = receiptService.findQuota(params);
        return Result.succeed(list);
    }

}
